package com.ler.yrmall.product.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ler.yrmall.product.vo.SpuInfoDetailVO;
import com.ler.yrmall.product.entity.SpuDetailEntity;
import com.ler.yrmall.product.mapper.SpuDetailMapper;
import com.ler.yrmall.product.service.SpuDetailService;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;


@Service
public class SpuInfoDescServiceImpl extends ServiceImpl<SpuDetailMapper, SpuDetailEntity> implements SpuDetailService {

    @Override
    public SpuInfoDetailVO getDescBySpuId(Long spuId) {
        SpuInfoDetailVO target = new SpuInfoDetailVO();
        BeanUtils.copyProperties(this.getById(spuId),target);
        return target;
    }

}